/* 全局样式重置 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* 布局样式 */
.site-layout {
  min-height: 100vh;
}

.site-layout-content {
  margin: 24px 16px;
  padding: 24px;
  min-height: 360px;
  background: #fff;
  border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .site-layout-content {
    margin: 12px 8px;
    padding: 16px;
  }
}

/* 卡片样式 */
.card-container {
  margin-bottom: 24px;
}

/* 表格样式 */
.ant-table {
  font-size: 14px;
}

/* 按钮组样式 */
.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 加载状态 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

/* 表单样式 */
.form-container {
  max-width: 600px;
  margin: 0 auto;
}

/* 统计卡片样式 */
.stat-card {
  text-align: center;
  padding: 20px;
}

.stat-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* 图表容器 */
.chart-container {
  width: 100%;
  height: 400px;
  margin: 20px 0;
}

/* 工具提示 */
.tooltip {
  position: relative;
  cursor: pointer;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 动画效果 */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式表格 */
.responsive-table {
  overflow-x: auto;
}

/* 页面标题 */
.page-title {
  margin-bottom: 24px;
  font-weight: 600;
  color: #262626;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 0;
}

/* 搜索区域 */
.search-section {
  margin-bottom: 24px;
  padding: 16px;
  background: #fafafa;
  border-radius: 8px;
}

/* 操作按钮组 */
.operation-group {
  margin-bottom: 16px;
}

/* 状态标签 */
.status-tag {
  margin: 0 4px;
}

/* 响应式菜单 */
@media (max-width: 576px) {
  .ant-layout-sider {
    position: fixed;
    z-index: 1000;
  }
  
  .ant-layout-sider-collapsed {
    width: 0 !important;
    min-width: 0 !important;
  }
}

/* 自定义antd样式覆盖 */
.ant-btn-primary {
  background-color: #1890ff;
  border-color: #1890ff;
}

.ant-btn-primary:hover {
  background-color: #40a9ff;
  border-color: #40a9ff;
}

.ant-layout-sider {
  background: #001529;
}

.ant-menu-dark {
  background: #001529;
}

.ant-menu-dark .ant-menu-item-selected {
  background-color: #1890ff;
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #141414;
    color: #ffffff;
  }
  
  .site-layout-content {
    background: #1f1f1f;
    color: #ffffff;
  }
}

/* 打印样式 */
@media print {
  .no-print {
    display: none !important;
  }
  
  .site-layout-content {
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
}